Repository navigation
Keep Agent Mode session titles consistent across tabs and history - #3380
logancyang wants to merge 5 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c450f1d222
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e65c4d8c4f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e5ea6096df
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 36faf3f3f0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Relates to #3378
Why
A user can rename an Agent Mode tab, then open Recent Chats or the previous-sessions list and still see the first prompt instead. Saved chat notes kept the tab label and history title in different fields, so finding a named workflow meant reopening chats one by one.
What
Existing chats use their saved history title, then their saved tab label, then the filename. Native-only sessions continue to use their local session index.
Non goal
Screenshot
No screenshot is attached because the dedicated dev vault displays unrelated note content beside Agent Chat. The live UI checks and saved-note inspection are recorded below.
Risk
High — this changes writes to saved chat notes and serializes a rename with an in-flight autosave. The existing frontmatter fields remain compatible with older chats, but a revert cannot undo a title the user changed while running this version.
topicandagentLabelfields are reused; no schema or external interface changes.Review: inspect
AgentChatPersistenceManager.saveSession(),updateTopic(), andreadExistingMeta()insrc/agentMode/session/AgentChatPersistenceManager.ts, thenAgentSessionManager.getChatHistoryItems(),updateChatTitle(),readSessionRefFromFile(), andrenameSession()insrc/agentMode/session/AgentSessionManager.ts. Run Verification steps 1–4, including the clear-title and overlapping-save cases.Verification
Observed in Obsidian before the review fixes (
logan-dev-vault): The built plugin was loaded and its new title code was confirmed at runtime. Renaming an existing Claude session tab changed Chat History and Recent Chats; opening it from Recent Chats kept the title. On a saved Markdown chat, a later tab rename updated the note’sagentLabeland Recent Chats. The saved title remained after disabling and re-enabling the plugin. I restored the test chat’s original title afterward. One immediate rename during the first manual save exposed a race; a deterministic red/green regression test now covers the reconciliation. The other edge cases in steps 3–4 are covered by unit tests, not a live UI run. Obsidian reported no captured errors.Review-fix verification (6d33d60): Four focused suites pass (251 tests), including folded YAML reopening, BOM/CRLF compatibility, hidden-folder history titles, transcript preservation, and the filename fallback after clearing saved title fields. The new regression cases were observed failing before the corrections. Format, lint, production build, and the Obsidian review gate pass. These review fixes were verified with unit tests, without another live Obsidian UI run.